# Contributor: 
# Maintainer: 
pkgname=libtxc_dxtn
pkgver=1.0.1
pkgrel=5
pkgdesc="S3TC texture decompression helper library"
url="http://dri.freedesktop.org/wiki/S3TC"
arch="all"
license="BSD"
depends_dev="mesa-dev"
makedepends="$depends_dev automake autoconf libtool"
subpackages="$pkgname-dev"
source="$pkgname-$pkgver-r$pkgrel.tar.bz2::https://people.freedesktop.org/~cbrill/$pkgname/$pkgname-$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	libtoolize --force && aclocal -I m4 && autoreconf -fvi \
		&& automake --add-missing
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		|| return 1
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	rm "$pkgdir"/usr/lib/libtxc_dxtn.la
}

sha512sums="56714a8c947d9b1f47e3ccb23cff9e4e57bd131907a82968de521d094a000275b3aaeecff28e9184bcc4f3932baa1a8bfbbefbc970fcd034ff953d0617148479  libtxc_dxtn-1.0.1-r5.tar.bz2"
